#ifndef _PLAYER_H
#define _PLAYER_H

#include <boost/shared_ptr.hpp>
#include "Logic/NetObject.h"
#include "Logic/LogicTypeDef.h"
#include "Logic/Bag.h"

enum
{
	Error_Unkonw,
	Error_Password,
};

class LoginPlayer : public NetObject
{
public:
	enum
	{
		State_None,
		State_Logining,
		State_Logined,
		State_Kick,
	};
	LoginPlayer(Server_Con _pCon);
	int getState()const;
	void setState(int _state);
	
	void setAccount(const std::string&);
	const std::string& getAccount()const;

	virtual bool tick(int deta);

private:
	int m_state;
	std::string m_account;

};

class Player : public NetObject
{
public:
	enum
	{
		State_Noraml,
		State_Logout,
		State_Kick,
	};
	Player(const NetObject_PTR& _loginPlayer);
	virtual ~Player();
	bool tick(int deta);

	int getState()const;
	void setState(int _state);

	void setAccount(const std::string&);
	void setPlayerID(PlayerID id);
	const std::string& getAccount()const;

private:
	int							m_state;
	std::string					m_account;
	PlayerID					m_playerID;
	Bag							m_bag;

};


#endif